import com.hanxu.dao.UserMapper;
import com.hanxu.pojo.User;
import com.hanxu.utlis.MybatisUtils;
import org.apache.ibatis.session.SqlSession;
import org.junit.Test;

import java.util.List;

public class Mytest3 {

    @Test
    public void test(){
        SqlSession sqlsession = MybatisUtils.getSqlsession();
        UserMapper mapper = sqlsession.getMapper(UserMapper.class);
        List<User> userList = mapper.getUserList();
        for (User user : userList) {
            System.out.println(user);
        }


        sqlsession.close();
    }

}

